package com.example.conversation.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 对话消息表
 * </p>
 *
 * @author crp
 * @since 2025-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("messages")
public class Messages implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 消息ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 会话ID
     */
    @TableField("conversation_id")
    private Long conversationId;

    /**
     * 发送者类型：1-用户，2-AI角色
     */
    @TableField("sender_type")
    private Integer senderType;

    /**
     * 消息内容
     */
    @TableField("content")
    private String content;

    /**
     * 内容类型：text-文本，voice-语音
     */
    @TableField("content_type")
    private String contentType;

    /**
     * 语音文件URL
     */
    @TableField("voice_url")
    private String voiceUrl;

    /**
     * 情绪类型
     */
    @TableField("emotion_type")
    private String emotionType;

    /**
     * 情绪强度(0-1)
     */
    @TableField("emotion_intensity")
    private BigDecimal emotionIntensity;

    /**
     * AI响应时间(毫秒)
     */
    @TableField("ai_response_time")
    private Integer aiResponseTime;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;


}
